<script setup lang="ts">
interface Person {
  name: string;
  age: number;
}
const {age=8} = defineProps<Person>();
</script>

<template>
  <div class="son">
    <h2>我是子组件</h2>
    <p>{{ name }}</p>
    <p>{{ age }}</p>
  </div>
</template>

<style scoped>
.son {
  border: 1px solid red;
}
</style>
